﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="CreateUser.aspx.vb" Inherits="TWIN_test.CreateEmployee" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body background="../Images/Training-Administrator-Background.gif" text="white">
    <form id="form1" runat="server">
    <center><div style="height: 395px">
           <h1><strong>Create Employee Profile</strong></h1><br />
           <table>
            <tr><td>Email Address   :</td><td><asp:TextBox id="userEmailBox" runat="server" 
                ReadOnly="False" /></td></tr>
            <tr><td>User Name :</td><td><asp:TextBox id="createUserNameBox" runat="server" 
                ReadOnly="False" /></td></tr>
             <tr><td>Password        :</td><td><asp:TextBox id="createUserPasswordBox" TextMode="password" 
                runat="server" ReadOnly="False" /></td></tr>  
                <tr><td>Min Characters = 4 | 1 Non-alphanumeric</td></tr> 
          

             <tr><td>First Name      :</td><td><asp:TextBox id="userFirstNameBox" 
                runat="server" ReadOnly="False" /></td></tr>
             <tr><td>Last Name       :</td><td><asp:TextBox id="userLastNameBox" 
                runat="server" ReadOnly="False" /></td></tr> 
             <tr><td>Street          :</td><td><asp:TextBox id="userStreetBox" 
                runat="server" ReadOnly="False" /></td></tr>
             <tr><td>City            :</td><td><asp:TextBox id="userCityBox" runat="server" 
                ReadOnly="False" /></td></tr>
             <tr><td>State           :</td><td><asp:TextBox id="userStateBox" runat="server" 
                ReadOnly="False" /></td></tr> 
             <tr><td>ZIP             :</td><td><asp:TextBox id="userZipBox" runat="server" ReadOnly="False" /></td></tr>
             </table><br /><br />
            
            
             <asp:RadioButtonList ID="RadioButtonList1" runat="server" 
               DataSourceID="SqlDataSource2" DataTextField="ROLENAME" 
               DataValueField="ROLENAME">
                 <asp:ListItem>Administrator</asp:ListItem>
                 <asp:ListItem>Employee</asp:ListItem>
                 <asp:ListItem>Instructor</asp:ListItem>
           </asp:RadioButtonList>

            
            
             <br />
           <br />
             <asp:Button id="createButton" runat="server" text="Save and Create Employee" /> 
            

            <asp:Button ID="backButton" runat="server" Text="Back" />
            

           <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
               ConnectionString="<%$ ConnectionStrings:ConnectionString2 %>" DeleteCommand="z" 
               InsertCommand="INSERT INTO INFO(USERNAME, STREETADDRESS, CITY, STATE, ZIPCODE, FIRSTNAME, LASTNAME) VALUES (:userid,:streetAddress,:city,:state,:zipcode, :fname, :lname)" 
               ProviderName="<%$ ConnectionStrings:ConnectionString2.ProviderName %>" 
               SelectCommand="z" UpdateCommand="z">
               
               <insertparameters>
           
              <asp:controlparameter name="streetAddress" controlid="userStreetBox" propertyname="Text"/>
              <asp:controlparameter name="city" controlid="userCityBox" propertyname="Text"/>
              <asp:controlparameter name="state" controlid="userStateBox" propertyname="Text"/>
              <asp:controlparameter name="zipCode" controlid="userZipBox" propertyname="Text"/>
              <asp:controlparameter name="fname" controlid="userFirstNameBox" propertyname="Text"/>
              <asp:controlparameter name="lname" controlid="userLastNameBox" propertyname="Text"/>
                </insertparameters>
               
               </asp:SqlDataSource>
           <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
               ConnectionString="<%$ ConnectionStrings:ConnectionString2 %>" 
               ProviderName="<%$ ConnectionStrings:ConnectionString2.ProviderName %>" 
               SelectCommand="SELECT &quot;ROLENAME&quot; FROM &quot;ORA_ASPNET_ROLES&quot;">
           </asp:SqlDataSource>
               </div> </center>
    </form>
</body>
</html>
